{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Pickups"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Pickups define relationships between the components of a lens. For instance, in a singlet lens, the radii of curvature can be constrained to be equal in magnitude but opposite in sign."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "\n",
    "from optiland import optic, optimization"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Define a starting lens:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAzkAAADfCAYAAADV5x0bAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/TGe4hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAzZUlEQVR4nO3de3Bc9WH3/885eztH0mp3JetiaW1jc7HjcGtsICZP80DgB+ShfULbyeSPNGNof8w0NZlQ82uL2waGKR0naaZDkzIkbackf/woTKYheZKWBB6uT37hFhMIVwcSbpIsWQZJq8vez/n9sbtndyXZloxWq7N6v2Y8aLXH6GvPWt63v5djuK7rCgAAAABahNnsAQAAAADASiJyAAAAALQUIgcAAABASyFyAAAAALQUIgcAAABASyFyAAAAALQUIgcAAABASwk2ewAn4jiORkZGFI1GZRhGs4cDAAAAoElc19X09LQGBgZkmieeq1nTkTMyMqJNmzY1exgAAAAA1oh3331XyWTyhNes6ciJRqOSpF//5k3vYwAAAADrz/T0tE7ftnVJXbCmI6eyRC0ajaqzs7PJowEAAADQbEvZxsLBAwAAAABaCpEDAAAAoKUQOQAAAABaCpEDAAAAoKWs6YMH1pJfjU3ridePNXsYwKJmZ2c18d57CgUMRQJSOGAobEqRgKFw5XH5v5Hyc0FzaRv3VlJPb6+2bdu2ql8TAACsP0TO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3Sz3/+c33iE5/Qpz71Kb388suSeC02jYslu/vuu91YLLbg8//1X//lmqbpjo6Oep+766673M7OTjebza7iCLEeXHjhhe6+ffu8x8Vi0R0YGHAPHjzYxFFhvZHk3n///d5jx3Hc/v5+9+///u+9z01OTrqRSMT993//9yaMEOvJ0aNHXUnu448/7rpu6bUXCoXc7373u941r776qivJffLJJ5s1TKwjiUTC/dd//Vdei03ETM4KePLJJ3XOOeeor6/P+9yVV16pVCrlVTywEnK5nA4dOqTLL7/c+5xpmrr88sv15JNPNnFkWO/efPNNjY6O1r02Y7GYLrroIl6baLipqSlJUldXlyTp0KFDyufzda/HHTt2aPPmzbwe0VDFYlH33nuvZmdntWfPHl6LTRRs9gBawejoaF3gSPIej46ONmNIaFHHjh1TsVhc9PX22muvNWlUQPV73WKvTb4PopEcx9GNN96oj33sYzr77LMllV6P4XB4wT5aXo9olBdffFF79uxRJpNRR0eH7r//fu3cuVPPP/88r8UmWbczOTfffLMMwzjhD940AgCwtu3bt08vvfSS7r333mYPBevY9u3b9fzzz+vpp5/W5z//ee3du1evvPJKs4e1rq3bmZybbrpJ11577Qmv2bZt25L+X/39/QtOt6qcmtHf339K4wMWs2HDBgUCgQWnsoyNjfFaQ1NVXn9jY2PauHGj9/mxsTGdf/75TRoVWt0NN9ygH/3oR3riiSeUTCa9z/f39yuXy2lycrLuX9D5XolGCYfDOuOMMyRJu3bt0rPPPqt//Md/1Gc+8xlei02ybmdyenp6tGPHjhP+CIfDS/p/7dmzRy+++GLd6VYPPfSQOjs7tXPnzkb9ErAOhcNh7dq1Sw8//LD3Ocdx9PDDD2vPnj1NHBnWu61bt6q/v7/utZlKpfT000/z2sSKc11XN9xwg+6//3498sgj2rp1a93zu3btUigUqns9Hj58WO+88w6vR6wKx3GUzWZ5LTbRup3JWY533nlH77//vt555x0Vi0U9//zzkqQzzjhDHR0duuKKK7Rz50597nOf01e/+lWNjo7qb/7mb7Rv3z5FIpHmDh4tZ//+/dq7d692796tCy+8UHfccYdmZ2d13XXXNXtoaHEzMzN64403vMdvvvmmnn/+eXV1dWnz5s268cYbdfvtt+vMM8/U1q1b9aUvfUkDAwO65pprmjdotKR9+/bpnnvu0Q9+8ANFo1Fvb0MsFpNt24rFYvrjP/5j7d+/X11dXers7NQXvvAF7dmzRx/96EebPHq0mgMHDuiTn/ykNm/erOnpad1zzz167LHH9JOf/ITXYjM1+3g3P9i7d68racGPRx991Lvmrbfecj/5yU+6tm27GzZscG+66SY3n883b9Boad/4xjfczZs3u+Fw2L3wwgvdp556qtlDwjrw6KOPLvq9cO/eva7rlo6R/tKXvuT29fW5kUjEveyyy9zDhw83d9BoSYu9DiW5d999t3dNOp12//RP/9RNJBJuW1ub+3u/93vukSNHmjdotKw/+qM/crds2eKGw2G3p6fHveyyy9wHH3zQe57XYnMYruu6q59WAAAAANAY63ZPDgAAAIDWROQAAAAAaClEDgAAAICWQuQAAAAAaClEDgAAAICWQuQAAAAAaClEDgAAAICWQuQAAAAAaClEDgAAAICWQuQAAAAAaClEDgAAAICW8v8DjH/F4bh8r8YAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 1000x400 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "lens = optic.Optic()\n",
    "\n",
    "# add surfaces\n",
    "lens.add_surface(index=0, radius=np.inf, thickness=np.inf)\n",
    "lens.add_surface(index=1, radius=50, thickness=3, material=\"SK16\", is_stop=True)\n",
    "lens.add_surface(index=2, radius=-50, thickness=30)\n",
    "lens.add_surface(index=3)\n",
    "\n",
    "# set aperture\n",
    "lens.set_aperture(aperture_type=\"EPD\", value=10)\n",
    "\n",
    "# set fields\n",
    "lens.set_field_type(field_type=\"angle\")\n",
    "lens.add_field(y=0)\n",
    "\n",
    "# set wavelengths\n",
    "lens.add_wavelength(value=0.48)\n",
    "lens.add_wavelength(value=0.55, is_primary=True)\n",
    "lens.add_wavelength(value=0.65)\n",
    "\n",
    "lens.draw()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Define pickups:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "lens.pickups.add(\n",
    "    source_surface_idx=1,\n",
    "    attr_type=\"radius\",\n",
    "    target_surface_idx=2,\n",
    "    scale=-1,\n",
    "    offset=0,\n",
    ")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Define optimization problem:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "problem = optimization.OptimizationProblem()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Add operands (targets for optimization):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "\"\"\"\n",
    "Add a wavefront error operand for all wavelengths.\n",
    "\n",
    "Use Gaussian quadrature distribution for the rays (see distribution documentation for\n",
    "more information).\n",
    "\"\"\"\n",
    "\n",
    "for wave in lens.wavelengths.get_wavelengths():\n",
    "    input_data = {\n",
    "        \"optic\": lens,\n",
    "        \"Hx\": 0,\n",
    "        \"Hy\": 0,\n",
    "        \"num_rays\": 3,\n",
    "        \"wavelength\": wave,\n",
    "        \"distribution\": \"gaussian_quad\",\n",
    "    }\n",
    "    problem.add_operand(\n",
    "        operand_type=\"OPD_difference\",\n",
    "        target=0,\n",
    "        weight=1,\n",
    "        input_data=input_data,\n",
    "    )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Define variables - let first radius of curvature vary (the second surface will match this value, but with opposite sign):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "problem.add_variable(lens, \"radius\", surface_number=1)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Check initial merit function value and system properties:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "╒════╤════════════════════════╤═══════════════════╕\n",
      "│    │   Merit Function Value │   Improvement (%) │\n",
      "╞════╪════════════════════════╪═══════════════════╡\n",
      "│  0 │                3879.67 │                 0 │\n",
      "╘════╧════════════════════════╧═══════════════════╛\n",
      "╒════╤════════════════╤══════════╤══════════╤═════════╤═════════╤════════════════════╕\n",
      "│    │ Operand Type   │   Target │   Weight │   Value │   Delta │   Contribution (%) │\n",
      "╞════╪════════════════╪══════════╪══════════╪═════════╪═════════╪════════════════════╡\n",
      "│  0 │ OPD difference │        0 │        1 │ 40.0587 │ 40.0587 │            41.3618 │\n",
      "│  1 │ OPD difference │        0 │        1 │ 36.0072 │ 36.0072 │            33.4184 │\n",
      "│  2 │ OPD difference │        0 │        1 │ 31.2801 │ 31.2801 │            25.2198 │\n",
      "╘════╧════════════════╧══════════╧══════════╧═════════╧═════════╧════════════════════╛\n",
      "╒════╤═════════════════╤═══════════╤═════════╤══════════════╤══════════════╕\n",
      "│    │ Variable Type   │   Surface │   Value │ Min. Bound   │ Max. Bound   │\n",
      "╞════╪═════════════════╪═══════════╪═════════╪══════════════╪══════════════╡\n",
      "│  0 │ radius          │         1 │      50 │              │              │\n",
      "╘════╧═════════════════╧═══════════╧═════════╧══════════════╧══════════════╛\n"
     ]
    }
   ],
   "source": [
    "problem.info()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Define optimizer:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "optimizer = optimization.OptimizerGeneric(problem)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Run optimization:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "  message: CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH\n",
       "  success: True\n",
       "   status: 0\n",
       "      fun: 7.40021876171174\n",
       "        x: [-6.131e-01]\n",
       "      nit: 9\n",
       "      jac: [ 2.496e+02]\n",
       "     nfev: 58\n",
       "     njev: 29\n",
       " hess_inv: <1x1 LbfgsInvHessProduct with dtype=float64>"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "optimizer.optimize()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Print merit function value and system properties after optimization:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "╒════╤════════════════════════╤═══════════════════╕\n",
      "│    │   Merit Function Value │   Improvement (%) │\n",
      "╞════╪════════════════════════╪═══════════════════╡\n",
      "│  0 │                7.40022 │           99.8093 │\n",
      "╘════╧════════════════════════╧═══════════════════╛\n",
      "╒════╤════════════════╤══════════╤══════════╤══════════╤══════════╤════════════════════╕\n",
      "│    │ Operand Type   │   Target │   Weight │    Value │    Delta │   Contribution (%) │\n",
      "╞════╪════════════════╪══════════╪══════════╪══════════╪══════════╪════════════════════╡\n",
      "│  0 │ OPD difference │        0 │        1 │ 1.81071  │ 1.81071  │            44.3049 │\n",
      "│  1 │ OPD difference │        0 │        1 │ 0.899126 │ 0.899126 │            10.9244 │\n",
      "│  2 │ OPD difference │        0 │        1 │ 1.8202   │ 1.8202   │            44.7707 │\n",
      "╘════╧════════════════╧══════════╧══════════╧══════════╧══════════╧════════════════════╛\n",
      "╒════╤═════════════════╤═══════════╤═════════╤══════════════╤══════════════╕\n",
      "│    │ Variable Type   │   Surface │   Value │ Min. Bound   │ Max. Bound   │\n",
      "╞════╪═════════════════╪═══════════╪═════════╪══════════════╪══════════════╡\n",
      "│  0 │ radius          │         1 │ 38.6889 │              │              │\n",
      "╘════╧═════════════════╧═══════════╧═════════╧══════════════╧══════════════╛\n"
     ]
    }
   ],
   "source": [
    "problem.info()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Draw final lens:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAzkAAADfCAYAAADV5x0bAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjkuMSwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy/TGe4hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAA4XUlEQVR4nO3df3Ac9X038Pfu3u7e3m/JkizLkrEtE1xCgMRg1+RpC4EHyJC2NCmTadOMoR1mmppMUvO0xW1DhikdhyTToSE8kLRTkj8eAk0TkiYpKQQCTFtDiAkEAnaQf8TGsizJ+nG633u7+/xxt3t3upN0knXa2733a0Yjae8kfQ0n6d76fL+fj2BZlgUiIiIiIiKfEN1eABERERER0WpiyCEiIiIiIl9hyCEiIiIiIl9hyCEiIiIiIl9hyCEiIiIiIl9hyCEiIiIiIl9hyCEiIiIiIl8JuL2AxZimidHRUUSjUQiC4PZyiIiIiIjIJZZlYW5uDgMDAxDFxWs1bR1yRkdHMTQ05PYyiIiIiIioTZw6dQqDg4OL3qetQ040GgUAHD123HmbiIiIiIg6z9zcHIa3bmkqF7R1yLG3qEWjUcRiMZdXQ0REREREbmvmGAsbDxARERERka8w5BARERERka8w5BARERERka8w5BARERERka+0deOBdvLLs3N44e1Jt5dBtCBdL2LszChUSUAwAAQlAcGA/QJokgA1IEALAKILc6cGBwexcYl2j0RERESrgSGnSb88m8JXXjju9jKIFmSaJvKFAoqQYGHxEBOACVkwIAsmZJil1zXvG1CE8nWUr5dflJr3DcgwIS6RmQzDgCzL+PSf71vFfzERERFRYww5TfrQpRvwoUs3uL0MogX9/Oev4T9+8AP8wR/+IQyIyOgmsuWXTMFERjeQ1S1kdQMZ3azcXjCd93Pl13O6iaxulD5WN2GYi3/tUoVIhKaICMmlF02WoJXfzqVmMDd5Bj/8xRi29UawqTsEJcDdskRERNQ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6idHxGfyycAFe+84xHDv3BgdmEhERUUsx5BD5RDweRzqdhmmaC86iqQslBaMupDivC9Xvz7tfofS6YCw+/0oUgJAsQhZMiFYY70po+I0Lezkwk4iIiFqKIadJr5ycwbdeWdu/khMtRzKp43huE158/DUUTBEFU0DeFFAwgbxRertoLd5NTIQFRbSgSoAqWlBFC4pUviYCPaIFVbWgaOXbRECV7LdLr+2PVUQLAQEQBGBmZgazs7O485ab1+Y/BhEREXU0hpwmJbM63h5vz0PdRABQLJrIBGLQdROKUERUtLAuYEIVLCiiCUW0oFS/LVpQBRNy1dtSOZSsmFl+AVAovwCl7m9X7tx5fv9AIiIioiYx5DTp6ot6cfVFvW4vg4iIiIiIlsDN8ERERERE5CsMOURERERE5CsMOURERERE5CsMOURERERE5CsMOURERERE5Ctt3V3NskqDBufm5lxeCRERERERucnOBHZGWExbhxz7HzK8dYvLKyEiIiIionYwNzeHeDy+6H0Eq5ko5BLTNDE6OopoNArhvCYUnr9kMomhoSGcOnUKsVjM1bUQ8fFI7YSPR2onfDxSO+HjcXVZloW5uTkMDAxAFBc/ddPWlRxRFDE4OOj2MmrEYjE+SKlt8PFI7YSPR2onfDxSO+HjcfUsVcGxsfEAERERERH5CkMOERERERH5CkNOk1RVxWc/+1moqur2Uoj4eKS2wscjtRM+Hqmd8PHonrZuPEBERERERLRcrOQQEREREZGvMOQQEREREZGvMOQQEREREZGvMOQQEREREZGvMOQQEREREZGvMOQ04e///u9x1VVXIRQKIZFINLzPyZMncdNNNyEUCqGvrw9/8Rd/gWKxuLYLpY7x4IMPYvPmzQgGg9i1axd+8pOfuL0k6gAvvPACfvu3fxsDAwMQBAHf+c53am63LAt33303NmzYAE3TcN111+Htt992Z7HkawcOHMCVV16JaDSKvr4+3HzzzThy5EjNfXK5HPbu3Yt169YhEongIx/5CM6ePevSisnPHnroIVx66aWIxWKIxWLYvXs3nnzySed2PhbdwZDThEKhgFtuuQWf+MQnGt5uGAZuuukmFAoF/M///A++/vWv42tf+xruvvvuNV4pdYLHH38c+/btw2c/+1m88soruOyyy3DDDTdgfHzc7aWRz6XTaVx22WV48MEHG97++c9/Hl/60pfw8MMP46WXXkI4HMYNN9yAXC63xislv3v++eexd+9evPjii3j66aeh6zquv/56pNNp5z5//ud/ju9973v45je/ieeffx6jo6P48Ic/7OKqya8GBwfxuc99DocOHcJPf/pTfOADH8Dv/u7v4he/+AUAPhZdY1HTHnnkESsej9dd/4//+A9LFEVrbGzMufbQQw9ZsVjMyufza7hC6gQ7d+609u7d67xvGIY1MDBgHThwwMVVUacBYD3xxBPO+6ZpWv39/dYXvvAF59rMzIylqqr1jW98w4UVUicZHx+3AFjPP/+8ZVmlx54sy9Y3v/lN5z5vvfWWBcA6ePCgW8ukDtLV1WX98z//Mx+LLmIlZxUcPHgQ73nPe7B+/Xrn2g033IBkMumkeKLVUCgUcOjQIVx33XXONVEUcd111+HgwYMurow63fHjxzE2Nlbz2IzH49i1axcfm9Rys7OzAIDu7m4AwKFDh6Dres3jcfv27di0aRMfj9RShmHgscceQzqdxu7du/lYdFHA7QX4wdjYWE3AAeC8PzY25saSyKcmJydhGEbDx9vhw4ddWhVR5Wddo8cmfw5SK5mmiU9/+tN4//vfj0suuQRA6fGoKErdOVo+HqlVXn/9dezevRu5XA6RSARPPPEELr74Yrz66qt8LLqkYys5d911FwRBWPSFTxqJiIja2969e/HGG2/gsccec3sp1MEuuugivPrqq3jppZfwiU98Anv27MGbb77p9rI6WsdWcu68807ceuuti95n69atTX2u/v7+uu5WdteM/v7+Fa2PqJGenh5IklTXleXs2bN8rJGr7Mff2bNnsWHDBuf62bNncfnll7u0KvK7O+64A9///vfxwgsvYHBw0Lne39+PQqGAmZmZmr+g82cltYqiKNi2bRsAYMeOHXj55Zfxj//4j/joRz/Kx6JLOraS09vbi+3bty/6oihKU59r9+7deP3112u6Wz399NOIxWK4+OKLW/VPoA6kKAp27NiBZ555xrlmmiaeeeYZ7N6928WVUafbsmUL+vv7ax6byWQSL730Eh+btOosy8Idd9yBJ554As8++yy2bNlSc/uOHTsgy3LN4/HIkSM4efIkH4+0JkzTRD6f52PRRR1byVmOkydPYmpqCidPnoRhGHj11VcBANu2bUMkEsH111+Piy++GB//+Mfx+c9/HmNjY/jbv/1b7N27F6qqurt48p19+/Zhz549uOKKK7Bz507cf//9SKfTuO2229xeGvlcKpXCyMiI8/7x48fx6quvoru7G5s2bcKnP/1p3HvvvbjwwguxZcsWfOYzn8HAwABuvvlm9xZNvrR37148+uij+O53v4toNOqcbYjH49A0DfF4HH/yJ3+Cffv2obu7G7FYDJ/85Cexe/du/Pqv/7rLqye/2b9/Pz74wQ9i06ZNmJubw6OPPornnnsO//mf/8nHopvcbu/mBXv27LEA1L38+Mc/du5z4sQJ64Mf/KClaZrV09Nj3XnnnZau6+4tmnztgQcesDZt2mQpimLt3LnTevHFF91eEnWAH//4xw1/Fu7Zs8eyrFIb6c985jPW+vXrLVVVrWuvvdY6cuSIu4smX2r0OARgPfLII859stms9Wd/9mdWV1eXFQqFrN/7vd+zzpw5496iybf++I//2LrgggssRVGs3t5e69prr7Weeuop53Y+Ft0hWJZlrX20IiIiIiIiao2OPZNDRERERET+xJBDRERERES+wpBDRERERES+wpBDRERERES+wpBDRERERES+wpBDRERERES+wpBDRERERES+wpBDRERERES+wpBDRERERES+wpBDRERERES+wpBDRERERES+8v8BqZ/fNDbm9BMAAAAASUVORK5CYII=",
      "text/plain": [
       "<Figure size 1000x400 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "lens.draw(num_rays=5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Confirm that the radii of curvature are equal and opposite:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "╒════╤═════════════════╤══════════╤═════════════╤════════════╤═════════╤═════════════════╕\n",
      "│    │ Type            │   Radius │   Thickness │ Material   │   Conic │   Semi-aperture │\n",
      "╞════╪═════════════════╪══════════╪═════════════╪════════════╪═════════╪═════════════════╡\n",
      "│  0 │ Planar          │ inf      │         inf │ Air        │       0 │        5        │\n",
      "│  1 │ Stop - Standard │  38.6889 │           3 │ SK16       │       0 │        5        │\n",
      "│  2 │ Standard        │ -38.6889 │          30 │ Air        │       0 │        4.85123  │\n",
      "│  3 │ Planar          │ inf      │         nan │ Air        │       0 │        0.095248 │\n",
      "╘════╧═════════════════╧══════════╧═════════════╧════════════╧═════════╧═════════════════╛\n"
     ]
    }
   ],
   "source": [
    "lens.info()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
